// ButtonManager.h
#ifndef BUTTONMANAGER_H
#define BUTTONMANAGER_H

#include <QObject>
#include <QPushButton>
#include <QGridLayout>

class ButtonManager : public QObject {
    Q_OBJECT

public:
    explicit ButtonManager(QGridLayout *layout, QObject *parent = nullptr);
    QWidget *getButtonWidget() const; // 返回按钮容器的 QWidget 指针
signals:
    void buttonClicked(int); // 发送按钮名称的信号

private:
    QPushButton *createButton(const QString &text); // 创建按钮
    QWidget *buttonWidget; // 按钮容器

};

#endif // BUTTONMANAGER_H
